/*
 * @Author: “ygnnli” “1585923072@qq.com”
 * @Date: 2024-08-01 20:44:57
 * @LastEditors: “ygnnli” “1585923072@qq.com”
 * @LastEditTime: 2024-08-02 09:00:29
 * @FilePath: /110/40/consumer_producor/Task.hpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#pragma once

#include <iostream>
#include <string>
#include <functional>
// using Task = std::function<void()>;

class Task
{
public:
    Task() {}
    Task(int a, int b) : _a(a), _b(b), _result(0) {}
    void Excute() { _result = _a + _b; }

    std::string TResultoString()
    {
        return std::to_string(_a) + " + " + std::to_string(_b) + " = " + std::to_string(_result);
    }

    std::string DebugToString()
    {
        return std::to_string(_a) + " + " + std::to_string(_b) + " = ?";
    }

private:
    int _a;
    int _b;
    int _result;
};